<?php

use think\facade\Route;

Route::group("api", function () {
    Route::any("print", "api.print_serve/auth");
    Route::post("mini_login", "api.Login/miniLogin");
    Route::post("mini_user_phone", "api.Login/getPhoneNumber");
    Route::get("user/detail", "api.User/detail");
    Route::group("station", function () {
        Route::get("list", "api.Station/lst");
        Route::get("detail", "api.Station/detail");
        Route::get("discount", "api.Station/mathDiscount");
        Route::post("create_order", "api.Order/create");
        Route::post("reload_order", "api.Order/reload");
    });
    Route::group("order", function () {
        Route::any("detail", "api.Order/detail");
        Route::any("cancel", "api.Order/cancel");
    });
})->middleware([\app\middleware\ApiMiddleware::class,\app\middleware\CrossDomain::class]);
